var aAnswers = new Array( 8 );

aAnswers[ 0 ] = 1;
aAnswers[ 1 ] = 1;
aAnswers[ 2 ] = 2;
aAnswers[ 3 ] = 0;
aAnswers[ 4 ] = 1;
aAnswers[ 5 ] = 1;
aAnswers[ 6 ] = 2;
aAnswers[ 7 ] = 1;


function processQuiz()
{
	var aResponses = document.forms.form1.question0;
	
	var nCorrectResponses = 0;
	
		
	if( aResponses[ aAnswers[ 0 ] ].checked == true )
	{
		nCorrectResponses = nCorrectResponses + 1;
	}
		
	aResponses = document.forms.form1.question1;
	
	if( aResponses[ aAnswers[ 1 ] ].checked == true )
	{
		nCorrectResponses = nCorrectResponses + 1;
	}
	
	aResponses = document.forms.form1.question2;
	
	if( aResponses[ aAnswers[ 2 ] ].checked == true )
	{
		nCorrectResponses = nCorrectResponses + 1;
	}
	
	aResponses = document.forms.form1.question3;
	
	if( aResponses[ aAnswers[ 3 ] ].checked == true )
	{
		nCorrectResponses = nCorrectResponses + 1;
	}
	
	aResponses = document.forms.form1.question4;
	
	if( aResponses[ aAnswers[ 4 ] ].checked == true )
	{
		nCorrectResponses = nCorrectResponses + 1;
	}
	
	aResponses = document.forms.form1.question5;
	
	if( aResponses[ aAnswers[ 5 ] ].checked == true )
	{
		nCorrectResponses = nCorrectResponses + 1;
	}
	
	aResponses = document.forms.form1.question6;
	
	if( aResponses[ aAnswers[ 6 ] ].checked == true )
	{
		nCorrectResponses = nCorrectResponses + 1;
	}
	
	aResponses = document.forms.form1.question7;
	
	if( aResponses[ aAnswers[ 7 ] ].checked == true )
	{
		nCorrectResponses = nCorrectResponses + 1;
	}
	
	
	
	if( nCorrectResponses >= 6 )
	{
		alert( "Congratulations!!!  You got " + nCorrectResponses + " correct answers.  Please click NEXT at the top of the page to complete the course." );
	}
	else
	{
		alert( "Fail!  You need 8 correct answers to pass the quiz.  You only got " + nCorrectResponses + " answers correct.  Please try again. " );
	}
	window.parent.setScore( nCorrectResponses * 12.5);
}